package com.exposit.books.dao;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.Criterion;

public interface AbstractDAO<T, PK extends Serializable> {
	
	PK save(T obj);
	
	void update(T obj);
	
	List<T> getAll();
	
	List<T> getByCriteria(Criterion... criterion);
	
	T getById(PK id);
	
	void delete(PK id);
	
	void delete(T persistantObject);
}